﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="AddOrder.aspx.cs" Inherits="Admin_AddOrder" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>添加电话单</title>
    <link href="AdminCSS/style.css" rel="stylesheet" type="text/css" />
    <script src="../Scripts/gz-1.7.2.min.js" type="text/javascript"></script>
    <script src="../Scripts/My97DatePicker/WdatePicker.js" type="text/javascript"></script> 
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <table>
            <tr>
                <td>
                    姓名
                </td>
                <td>
                    <asp:TextBox ID="txtCustomerName" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    电话
                </td>
                <td>
                    <asp:TextBox ID="txtTel" runat="server"></asp:TextBox>
                    <asp:Button ID="btnQueryCustomerByTel" runat="server" Text="查找老客户" 
                        onclick="btnQueryCustomerByTel_Click" />
                </td>
            </tr>
            <tr>
                <td>
                    邮件
                </td>
                <td>
                    <asp:TextBox ID="txtEmail" runat="server"></asp:TextBox>
                    <asp:Button ID="btnQueryCustomer" runat="server" Text="查找老客户" 
                        onclick="btnQueryCustomer_Click" />
                    <asp:HiddenField ID="HCustomerId" runat="server" />
                </td>
            </tr>
            <tr>
                <td>
                    配送区域
                </td>
                <td>
                    <asp:DropDownList ID="drpRegion" runat="server" AutoPostBack="True" OnSelectedIndexChanged="drpRegion_SelectedIndexChanged">
                    </asp:DropDownList>
                    -<asp:DropDownList ID="drpBusinessDistrict" runat="server" AutoPostBack="True" OnSelectedIndexChanged="drpBusinessDistrict_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:DropDownList ID="drpOffice" runat="server" AutoPostBack="True" OnSelectedIndexChanged="drpOffice_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:DropDownList ID="drpFloor" runat="server">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    地址
                </td>
                <td>
                    <asp:TextBox ID="txtAddress" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    备注
                </td>
                <td>
                    <asp:TextBox ID="txtMemo" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    配送日期
                </td>
                <td>
                    <asp:TextBox ID="txtDeliveryDate" onfocus="WdatePicker({doubleCalendar:true,dateFmt:'yyyy-MM-dd'})" runat="server"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    配送时段
                </td>
                <td>
                    <asp:DropDownList ID="drpDeliveryPeriodId" runat="server"  >
                    </asp:DropDownList>
                </td>
            </tr>
        </table>
        <br />
        <asp:GridView ID="ProductList" runat="server" AutoGenerateColumns="False" EnableModelValidation="True"
            Width="100%" CellPadding="4" ForeColor="#333333" GridLines="None">
            <AlternatingRowStyle BackColor="White" />
            <Columns>
                <asp:BoundField DataField="Id" HeaderText="商品Id" >
                <HeaderStyle Width="20%" />
                </asp:BoundField>
                <asp:BoundField DataField="ProductName" HeaderText="商品名" >
                <HeaderStyle Width="20%" />
                </asp:BoundField>
                <asp:BoundField DataField="ProductStyle" HeaderText="规格" >
                <HeaderStyle Width="20%" />
                </asp:BoundField>
                <asp:BoundField DataField="Price" HeaderText="价格" >
                <HeaderStyle Width="20%" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="数量">
                    <ItemTemplate>
                        <asp:TextBox ID="txtCnt" runat="server" Text="0" 
                            ontextchanged="txtCnt_TextChanged" AutoPostBack="True"></asp:TextBox>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
            <EditRowStyle BackColor="#7C6F57" />
            <FooterStyle BackColor="#1C5E55" Font-Bold="True" ForeColor="White" />
            <HeaderStyle BackColor="#DFDEDC" Font-Bold="True" ForeColor="White" />
            <PagerStyle BackColor="#666666" ForeColor="White" HorizontalAlign="Center" />
            <RowStyle BackColor="#E3EAEB" />
            <SelectedRowStyle BackColor="#C5BBAF" Font-Bold="True" ForeColor="#333333" />
        </asp:GridView>
        订单总价：<asp:Label ID="lblOrderAmount" runat="server" Text="0"></asp:Label>元<br />
        <asp:Button ID="btnAddOrder" runat="server" Text="添加" Width="70px" OnClick="btnAddOrder_Click" />
        
        <br />
    </div>
    </form>
</body>
</html>
